/**
 * Copyright (c) 2018-2019 PoleStar Studio. All Rights Reserved. <br>
 * Use is subject to license terms.<br>
 * <p>
 * 在此处填写文件说明
 */
package com.itheima.factorybean;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
//切面类


/**
 * 填写功能简述.
 * <p>填写详细说明.<br>
 * @version v1.0
 * @author lianzuozheng
 * @date 2019/4/23 -下午 08:28 
 */
public class MyAspect implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation mi) throws Throwable{
        check_Permissions();
        //执行目标方法
        Object obj=mi.proceed();
        log();
        return obj;
    }

    private void check_Permissions() {
        System.out.println("模拟检查权限...");
    }

    private void log() {
        System.out.println("模拟记录日志...");
    }
}
